/**
*  \file fdmem.h
*
*  \brief   File device memory access module.
*
*  \author  Michael J. Hohmann <michael.hohmann@linde-mh.de>
*  \author  Michael Kunkelmann <m.kunkelmann@webergmbh.de>
*
*
*/

#ifndef FDMEM_H_INCLUDED
#define FDMEM_H_INCLUDED

/*================================================[ public includes  ]================================================*/
#include "../cfg/prj.h"
#include "../fd/fd.h"

/*================================================[ public defines   ]================================================*/

/*================================================[ public datatypes ]================================================*/


/** File device memory access object. */
struct fdmem
{
   struct fd fd;                          /**< File device object. Must be first member. */
   struct fd_stat transmission_status;    /**< File device status object. */
   U8 *data;                              /**< Data being handled from the file device. */
};
/*================================================[ public variables ]================================================*/

/*================================================[ public functions ]================================================*/

/**
*  Initialization of the file device memory access object.
*
*  The function fdmem_initialize() initializes the fdmem module for accessing a device in RAM as a devive.
*
*  \param me Pointer to hte fdmem object. It is not save to pass NULL.
*  \param data File data to be handled.
*  \param min Minimum data which must be handled.
*  \param size Size of the data to be handled.
*
*  \return RC_SUCCESS if successful.
*/
RC fdmem_initialize( struct fdmem *me, void* data, U32 min, U32 size );

/*====================================================================================================================*/

#endif

/***********************************************************************************************************************
*                             Copyright 2011 Linde Material Handling. All rights reserved.                             *
***********************************************************************************************************************/
